package com.wsp.service.mapper;

import com.wsp.apimanagement.pojo.entity.Source;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Package: com.wsp.service.mapper
 * Description： TODO
 *
 * @Author: 巫思平
 * Copyright: Copyright (c) 2020
 * Version: 1
 */
@Mapper
@Repository
public interface SourceMapper {
    /**
     * 获取首页推荐视频
     * @param moduleIdList
     * @return
     */
    List<Source> getIndexSource(List<Integer> moduleIdList);

    /**
     * 获取模块对应的资源
     * @param moduleId
     * @return
     */
    List<Source> getSourceByModuleId(long moduleId);

    /**
     * 获取默认推荐
     * @return
     */
    List<Source> getRandomSource(int num, int maxId);

    /**
     * 获取最大的sourceId
     * @return
     */
    Integer getMaxSourceId();
}
